package com.system.mapper;

import com.system.pojo.ContractGoods;
import com.system.pojo.ContractGoodsExample;
import com.system.pojo.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContractGoodsMapper {
    long countByExample(ContractGoodsExample example);

    int deleteByExample(ContractGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ContractGoods record);

    int insertSelective(ContractGoods record);

    List<ContractGoods> selectByExample(ContractGoodsExample example);

    ContractGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ContractGoods record, @Param("example") ContractGoodsExample example);

    int updateByExample(@Param("record") ContractGoods record, @Param("example") ContractGoodsExample example);

    int updateByPrimaryKeySelective(ContractGoods record);

    int updateByPrimaryKey(ContractGoods record);

    List<ContractGoods> selectByContractId(Integer contractId);

    int deleteByCidAndCgid(Integer cgId);

    List<ContractGoods> selectByProductId(Integer pid);

    int updateProductNameByProductId(Product product);
}